package day03;

public class OperDemo4 {
    public static void main(String[] args) {
         int a =5;
         a+=10;//相当于a=(int)(a+10);
        a*=2;//相当于a=(int)(a*2);


        //面试题
        short s=5;
        //s=s+10;///编译错误，需强转，改为:s=(short)(s+10);
        //s=(short)(s+10);//s与int型运算转为int型所以结果为int s为short所以报错
        s +=10;//自带强转 s=(short)(s+10)
    }
}
